Belgelerim/ceng_491/implementation/doxygen/TraffEdu_Developers_Manual_Reference_ToSource/CommandInsertTrafficLight.cpp

Go to the documentation of this file.
00001 
00002 
00003 CommandInsertTrafficLight::CommandInsertTrafficLight(osg::Vec3 pos, OSGWindows* osgwind,
00004                                                         TrafficLightTypes newType,
00005                                                         TrafficLightColor newColor,
00006                                                         TrafficLightColor newArrowColor)
00007 
00008 {
00009         osgwind_ = osgwind;
00010         light=new TrafficLight(osgwind_,newType,newColor,newArrowColor);
00011         light->setPosition(pos.x(),pos.y(),pos.z());
00012         light->setScale(0.5,0.5,0.5);
00013         light->getObjectGroup()->setUserData(light);
00014         osgwind_->addObject(light);
00015 
00016         insertedObjs_.push_back(light); 
00017 }
00018 
00019 bool CommandInsertTrafficLight::execute()
00020 {
00021         
00022         osgwind_->doAddGeode(light);
00023         
00024         return true;
00025 }
00026 
00027 bool CommandInsertTrafficLight::unexecute()
00028 {
00029 
00030         osgwind_->doDeleteGeode(light);
00031         
00032         return true;
00033         
00034 }

Generated on Sun May 28 18:54:09 2006 for TraffEdu by  doxygen 1.4.6-NO